<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="left-sidebar" th:fragment="left-sidebar">
    <!-- 用户信息 -->
    <div class="tpl-sidebar-user-panel">
        <div class="tpl-user-panel-slide-toggleable">
            <div class="tpl-user-panel-profile-picture">
                <a id="userUnit" href="/userUnit">
                    <!--<a id="userUnit" href="static/templates/user-unit.html">-->
                <img src="static/assets/img/user04.png" alt="">
                </a>
            </div>
            <span class="user-panel-logged-in-text">
                <i class="am-icon-circle-o am-text-success tpl-user-panel-status-icon"></i>
                <a th:if="${session!=null and session.user!=null}">欢迎你, <span th:text="${session.user.name}"></span> </a>
                <a th:if="${session==null or session.user==null}"><span >未登录</span></a>
          </span>
            <a href="javascript:;" class="tpl-user-panel-action-link">
                <!--<span class="am-icon-pencil"></span> 账号设置-->
            </a>
        </div>
    </div>

    <!-- 菜单 -->
    <ul class="sidebar-nav">
        <!--<li class="sidebar-nav-heading">Components <span class="sidebar-nav-heading-info"> 附加组件</span></li>-->

        <li class="sidebar-nav-link" data-menu-item="index">
            <a href="/notebooks" class="active">
                <i class="am-icon-book sidebar-nav-link-logo"></i> 笔记本列表
            </a>
            <!--<a href="static/templates/notebook-list.html" class="active">
                <i class="am-icon-home sidebar-nav-link-logo"></i> 首页
            </a>-->
        </li>
        <li class="sidebar-nav-link" data-menu-item="task">
            <a href="static/templates/index-content.html" >
                <i class="am-icon-home sidebar-nav-link-logo"></i> 任务
            </a>
        </li>
        <li class="sidebar-nav-link" data-menu-item="share">
            <a href="static/templates/index-content.html">
                <i class="am-icon-home sidebar-nav-link-logo"></i> 共享资源
            </a>
        </li>
        <li class="sidebar-nav-link" data-menu="notemenu">
            <!-- href="javascript:;" 可以阻止a标签的默认事件-->
            <a href="javascript:;" class="sidebar-nav-sub-title">
                <i class="am-icon-table sidebar-nav-link-logo"></i> 个人中心
                <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
            </a>
            <ul th:each="notebook:${notebooks}" class="sidebar-nav sidebar-nav-sub">
                <li class="sidebar-nav-link" data-menu-item="notelist">
                    <a href="static/templates/note-list-img.html">
                        <i class="am-icon-angle-right sidebar-nav-link-logo"></i>
                        <font th:text="${notebook.title}"></font>
                    </a>
                </li>
                <!--
                <li class="sidebar-nav-link" data-menu-item="notelist">
                    <a href="static/templates/note-list-img.html">
                        <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 文字列表
                    </a>
                </li>

                <li class="sidebar-nav-link" data-menu-item="notelist">
                    <a href="static/templates/note-list-img.html">
                        <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 图文列表
                    </a>
                </li>
-->
            </ul>
        </li>
        <!--
        <li class="sidebar-nav-link">
            <a href="tables.html">
                <i class="am-icon-table sidebar-nav-link-logo"></i> 表格
            </a>
        </li>
        <li class="sidebar-nav-link">
            <a href="calendar.html">
                <i class="am-icon-calendar sidebar-nav-link-logo"></i> 日历
            </a>
        </li>
        <li class="sidebar-nav-link">
            <a href="form.html">
                <i class="am-icon-wpforms sidebar-nav-link-logo"></i> 表单

            </a>
        </li>
        <li class="sidebar-nav-link">
            <a href="chart.html">
                <i class="am-icon-bar-chart sidebar-nav-link-logo"></i> 图表

            </a>
        </li>

        <li class="sidebar-nav-heading">Page<span class="sidebar-nav-heading-info"> 常用页面</span></li>
        <li class="sidebar-nav-link">
            <a href="javascript:;" class="sidebar-nav-sub-title">
                <i class="am-icon-table sidebar-nav-link-logo"></i> 数据列表
                <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
            </a>
            <ul class="sidebar-nav sidebar-nav-sub">
                <li class="sidebar-nav-link">
                    <a href="table-list.html">
                        <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 文字列表
                    </a>
                </li>

                <li class="sidebar-nav-link">
                    <a href="note-list-img.html">
                        <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 图文列表
                    </a>
                </li>
            </ul>
        </li>
        <li class="sidebar-nav-link">
            <a href="sign-up.html">
                <i class="am-icon-clone sidebar-nav-link-logo"></i> 注册
                <span class="am-badge am-badge-secondary sidebar-nav-link-logo-ico am-round am-fr am-margin-right-sm">6</span>
            </a>
        </li>
        <li class="sidebar-nav-link">
            <a href="login.html">
                <i class="am-icon-key sidebar-nav-link-logo"></i> 登录
            </a>
        </li>
        <li class="sidebar-nav-link">
            <a href="jingjing-error.html">
                <i class="am-icon-tv sidebar-nav-link-logo"></i> 404错误
            </a>
        </li>
-->
    </ul>
</div>


</body>
</html>